package com.example.demo.common;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 查询参数
 *
 * @author yuanzheng
 * @since 2022-01-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "分页参数对象", description = "分页参数对象")
@NoArgsConstructor
@AllArgsConstructor
public class QueryParameter {

    @ApiModelProperty(name = "tableName", value = "查询表")
    @JsonProperty(value = "tableName")
    private String tableName;

    @ApiModelProperty(name = "curPage", value = "当前页")
    @JsonProperty(value = "curPage")
    private Integer curPage;

    @ApiModelProperty(name = "pageSize", value = "每页记录条数")
    @JsonProperty(value = "pageSize")
    private Integer pageSize;

    @ApiModelProperty(name = "sortName", value = "排序字段")
    @JsonProperty(value = "sortName")
    private String sortName;

    @ApiModelProperty(name = "sortOrder", value = "排序方式")
    @JsonProperty(value = "sortOrder")
    private String sortOrder;
}
